The Marksman™ Editor is very much like a 'Draw' type program. You select the type of item to draw, things like Buttons and Checkboxes instead of Circles and Squares. You then define where it is to go on the worksheet, the worksheet is the inside area of the window you are working on. You can later move that item, resize it, delete it, and perform other operations on it.
You can create part of your interface design, instantly simulate it and try it out, modify it, simulate and try it out again, etc.
In this tutorial we will go thru the steps of creating a simple program. We will use most of Marksman's features, the ones not used will be obvious to you after you become familiar with the features we cover here.
Marksman™ automatically creates a default prototype for you to start working on.
The Window titled "Marksman™ - Untitled" is the Project window. This window contains a list of all the Alerts, Dialogs, and Windows in this prototype program.
At the top of this window are two Icon buttons. The Icon button on the left will open the Menu Editor. The button on the right will open the Worksheet creation dialog, where you define the Worksheet type as a Window, Dialog, or Alert.
Press on the Worksheet creation button, the one that looks like a window. This brings up the powerful Worksheet creation dialog.
Enter the name as "About Tutorial".
Select the middle icon in the "Dialogs" section. This is a Modal Dialog, as described in the help info at the bottom of this dialog.
Select the different window, dialog, and alert types to see the description for each one. When you are done then select the Modal Dialog icon before pressing the "OK" button.
You now have the worksheet open for the About Dialog we are about to design. The column of tools along the left side are the controls available for our use.
The Grow box at the bottom right is for resizing the visible worksheet area. This is not the size of the Dialog, it is only the visible portion while we are in the Editor.
The rectangle that is right below and next to the "OK" button is the size of the content area of our Dialog. That size can be resized by putting the arrow cursor on the box and dragging it. Be sure to resize it back after you try out resizing it.
The Icons across the top of this worksheet are, from left to right:
a) Window Position Dialog - This brings up the dialog that allows us to position the Dialog on the screen.
b) Guidelines - This brings up guidelines for use in designing our windows.
c) Window Info Dialog - This brings up the Info dialog about our current worksheet. In this dialog we can change the name and set attributes about the worksheet.
d) Look - Start the simulator, but bring up this window as the first one to be simulated. Use this to quickly look at what your design is going to look like.
The other icons show the current size and position of the currently selected control.
For this dialog we do not want a cancel button. Select the "Cancel" button with the mouse. Go to the 'Edit' menu and select the 'Clear' menu item. This deletes this control from the worksheet.
We now want to make sure that the "OK" button will be outlined as the default button when this dialog is opened. Select the "OK" button with the mouse. Either double click on the "OK" button or select the "Info" menu and the "Zone Info..." menu item.
This brings up the button info dialog:
Select the "Default button" checkbox. This will assure that this is the default button.
Let's look at the other options available.
The "Global" selection determines if this is a "Local" or a "Global" control. A "Global" control maintains it's state, like dimmed or not, at all times thru the program's run. A "Local" control will always revert back to the designed state whenever that dialog is opened.
The "Close dialog" selection is selected. This means that when this button is pressed then this dialog will close.
The "Enabled, not dimmed" button is selected. This means that the initial state of this button is to be active, not dimmed out. If this were not checked then this button would be initially dimmed out, inactive.
The "Default button" checkbox was already described.
The "Locked position" selection will lock the button's position and size in the worksheet. This is to prevent accidently moving it. We do not need this selected at this time.
The "Link" button brings up a "Linkages" dialog that selects what things pressing this button is attached to. We do not want this button to open another window, or do any other kind of linkage, so we will not use it yet.
The "Colors" selections bring up popup palettes for selecting different control colors. Let's leave the button black and white for now.
The "B/W/ icon in the upper left is used to move this dialog automatically to a color screen, if not already on one, to allow color selection.
Press on the "OK" button to close this dialog and lets get back to designing.
We are now ready to add a message in this About Dialog. Select the Static Text tool, the one that looks like a normal "T". After selecting it, drag out a rectangle on the worksheet. Just clicking in the worksheet will use the default size of this control.
You will now have a worksheet with a Static Text area and the default text being "Message".
Position this rectangle by pressing the mouse down inside of it and dragging it around. To resize it, to aligh the right edge with the right edge of the "OK" button, press and drag in the bottom right corner of the control.
Double-click on the text box to bring up the Info dialog about Static Text.
The "Color" selection will cause the text to be displayed in the selected color.
The "Single line" attribute would cause the text to be in only one line and the text to be clipped off at the right of this rectangle area. We do not want that, we want the text to auto-wrap in the rectangle, so we leave it unchecked.
Now change the "Message" string to read something like "Marksman Tutorial program".
The name down in the ".i.Title;Title" area is for use in locating this string in the generated code. Since we have no interest in ever changing this string real-time in the program we can ignore it.
Press the "OK" button to close this dialog.
Resize the Text area and move the "OK" button and then resize the Dialog content area to be like the example shown:
Press the "QuickLook" button, the running man, to see what the dialog will look like in your final program.
When done then press the "OK" button. Then, under the "File" menu select the "Quit" item. This quits the simulation.
Press the Close box on the "About Tutorial" worksheet.
Press the Menu icon at the top of the Project window. This opens the Menu Editor.
We want the About dialog to open when the user selects the About menu item.
To tell the editor which item we are doing, even though it is already selected we will do it for practice, first select the "Apple" item in the "Menu" list.
Now select the "About" item in the "Commands" list.
To tell it what to link to we now press the "Link" button, in the lower left corner of this window.
We now have the "Linkages" dialog open for this menu item.
If any items were already linked to this item then they would appear in this list.
Press the button with the "Window" on it to show the available Alerts, Dialogs, and Windows to open for a linkage.
Now select the About dialog, so that it is checked.
Press the "Chain" button at the top to go back to the main connected list. The Dialog will now be in this list.
Press the OK button to close this window.
Press the close box on the "Menu Editor" window to close it for now.
Select the "Run" menu item from the "Special" menu. This will run our current program in it's entirety. Select the "About" menu item from the Apple menu. This brings up our About dialog, but in the wrong screen position.
Press the "OK" button to close this dialog. Select "Quit" from the "File" menu to end the simulation.
Double click on the "About Tutorial" item in the Project window, this opens that worksheet.
Screen Position.
From the "Layout" menu select the "Set Location..." menu item. This opens up the following display:
You could drag the window to the proper screen position. The problem would be when you ran this program on a different system with a different sized screen. The dialog would then show up in the wrong location. To solve this select both the "Vertically center" and the "Horzontally center" checkboxes. Now press the "OK" button to close this dialog.
Select the "Run" menu item from the "Special" menu. This will run our current program in it's entirety. Select the "About" menu item from the Apple menu. This brings up our About dialog, it is now in the correct screen position.
Press the "OK" button to close this dialog. Select "Quit" from the "File" menu to end the simulation.
Press the Close box for the "About Tutorial" worksheet, we are done with it.
Making a Window.
We are now ready to make a window full of controls. Select the Create Worksheet icon button, that looks like a window, in the Project window.
Make the selections and name changes:
Press the "OK button to close this dialog.
Add in the controls as shown below by:
a) selecting them from the palete.
b) Clocking or dragging thier location in the worksheet.
c) Positioning them by dragging them into place.
d) Resizing them by dragging thier size box.
Change thier name and attributes after creating them by:
a) Double clicking on them to bring up thier Info dialog.
b) Set thier name and attributes in this dialog.
c) Close this Info dialog by pressing the "OK" button.
d) Doing any repositioning or resizing necessary after the name and attribute changes were made.
To make sure that this window comes up automatically when this program is run we will select an option from the Window Info dialog.
From the "Info" menu select the "Window Info.." menu item. This brings up the dialog which we use to set the "Open at startup" selection.
Before we select the "OK" button to close this dialog, let's look at some of the other options available here.
The "Layer" popup is used to set the floating layer if this were to be a floating window.
The "Links" buttons are to attach linkages to the
a) Opening of this window.
b) Closing of this window.
c) Activating this window, when another window was active.
d) Deactivating this window, switching to another window. This is where we might dim scrollbars and that type of thing.
"Change window type" allows us to change this window to another type, or even into a dialog or an alert.
Press the "OK" button now to close this dialog.
Simulating our program.
To run our program like the user would, select the "Run" menu item from the "Special" menu.
Try out the window:
a) Type in a name.
b) Select a department.
c) Select between "Male" and "Female" and back again.
d) Select the Age popup menu for other ages.
When done select the "Quit" menu item from the "File" menu. This will end the simulation.
Saving our prototype.
From the Marksman™ "File" menu select the "Save" option. Give it a name and a place to save this prototype. (NOT available in the Demo version).
This ends the tutorial. You now know the basics. The other parts of Marksman are a snap now that you know the basics. Either experiment on your own or look thru the following section for more information.
Ordering.
Marksman 3.0 is available direct from IT Makers at:
IT Makers
P.O. Box 730152
San Jose, CA 95173
The source code generation supported as of Jan. 94 is:
1. THINK C 6.0
2. THINK C++ 6.0 using MM simple interface objects.
3. THINK C++ 6.0 using TCL.
4. MPW C 3.3
5. MPW Pascal 3.3
6. Metrowerks DR1 C
7. Metrowerks DR1 C++ using MM simple interface objects.
The price for the complete package is $125 plus $10 shipping. IT Makers accepts only checks on a US bank or Money Orders.
It may also be purchased thru MacTech Magazine, they accept credit cards, at the phone of: